cmake_minimum_required(VERSION 3.12)
project(fishbot_multipoint_nav)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(tl_expected REQUIRED)
find_package(generate_parameter_library REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(rclcpp_components REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(nav2_msgs REQUIRED)
find_package(fishbot_setparam REQUIRED)
find_package(std_msgs REQUIRED)



set(
  THIS_PACKAGE_INCLUDE_DEPENDS
  rclcpp
  tl_expected
  generate_parameter_library
  rclcpp_action
  rclcpp_components
  geometry_msgs
  nav2_msgs
  fishbot_setparam
  std_msgs
)

add_executable(fishbot_multipoint_nav src/fishbot_multipoint_nav.cpp)
target_include_directories(fishbot_multipoint_nav PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  $<INSTALL_INTERFACE:include>
)

ament_target_dependencies(fishbot_multipoint_nav PUBLIC  ${THIS_PACKAGE_INCLUDE_DEPENDS} )

install (
  TARGETS fishbot_multipoint_nav
  ARCHIVE DESTINATION lib
  LIBRARY DESTINATION lib
  RUNTIME DESTINATION lib/${PROJECT_NAME}
)

# Install libraries
install(
  TARGETS fishbot_multipoint_nav
  EXPORT export_${PROJECT_NAME}
  ARCHIVE DESTINATION lib
  LIBRARY DESTINATION lib
  RUNTIME DESTINATION bin
)

install(
  DIRECTORY include/
  DESTINATION include
)

install(
  DIRECTORY launch/
  DESTINATION share/${PROJECT_NAME}
)

ament_export_include_directories(
  include
)
ament_export_libraries(
  ${PROJECT_NAME}
)
ament_export_targets(
  export_${PROJECT_NAME}
)
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
ament_package()